package com.sc.highspeed.service;

import com.sc.highspeed.db.dao.UserMenuDao;
import com.sc.highspeed.db.model.UserMenuModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Admin on 2017/12/6.
 */
@Service
public class UserMenuService {

    @Autowired
    private UserMenuDao userMenuDao;

    public List<UserMenuModel> getUserMenuList() {
        return userMenuDao.getUserMenuList();
    }

    public List<UserMenuModel> getUserMenuByUsername(String name) {
        return userMenuDao.getUserMenuByUsername(name);
    }

    public UserMenuModel getUserMenu(String username, int menuid) {
        return userMenuDao.getUserMenu(username, menuid);
    }

    public int insertUserMenu(UserMenuModel userMenuModel) {
        return userMenuDao.insertUserMenu(userMenuModel);
    }

    public int udpateUserMenuByUsername(UserMenuModel userMenuModel) {
        return userMenuDao.updateUserMenuByUsername(userMenuModel);
    }

    public int deleteUserMenuByUsername(String username) {
        return userMenuDao.deleteUserMenuByUsername(username);
    }
}
